package com.quanyan.financialSystem.web.place;

import com.quanyan.api.APIResponse;
import com.quanyan.financialSystem.entity.vo.req.ReqPlaceInComeStream;
import com.quanyan.financialSystem.service.place.PlaceInComeStreamService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.propertyeditors.CustomDateEditor;
import org.springframework.web.bind.WebDataBinder;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * Created by Administrator on 2016/10/17.
 */
@RequestMapping("/admin/api/financialSystem/placeInComeStream")
@RestController
public class PlaceInComeStreamController {

    private static final Logger logger = LoggerFactory.getLogger(PlaceInComeStreamController.class);


//    @Autowired
//    private PlaceInComeStreamService placeInComeStreamService;

    @Resource(name = "inComeStream")
    private PlaceInComeStreamService placeInComeStreamService;


    @RequestMapping(value = "list" ,method = RequestMethod.POST)
    public APIResponse queryPlaceInComeStream(@RequestBody ReqPlaceInComeStream reqPlaceInComeStream){
        try{
           return placeInComeStreamService.findAllPlaceInComeStream(reqPlaceInComeStream);
        }catch (Exception e){
            logger.error("{}",e);
            return APIResponse.returnFail("系统异常！");
        }
    }



}
